home *** CD-ROM | disk | FTP | other *** search
- ;******************************************************************************
- ; Ver 13.0, Last Update Mar 15, 1995 *
- ; rtfLIB *
- ; *
- ; This library adds functionality to HLPDK 11.0+, and adds special functions *
- ; to RTF based targets : winHelp, MMViewer, RTF Word Processor target. *
- ; *
- ; The following added functionality is added : *
- ; *
- ; Text Attributes for internal pieces of text. (bold, undeline, italic) *
- ; Special Links : Graphics and Normal Non-Hilighted links. *
- ; Complete WINHELP Macro API support for WINHELP and MM Viewer targets. *
- ; INCLUDING The *UNDOCUMENTED* winhelp macros! *
- ; Multimedia - MCI string interface, Video, CDAudio, and generic FUN! *
- ; *
- ;******************************************************************************
-
- .ifdef rtfbased
-
- ;******************************************************************************
- ; Text Attributes *
- ; *
- ; boldText - Display text in bold, e.g. - ~Text~boldText~ - Text will be in *
- ; bold *
- ; italicText - Display text in italic *
- ; underlineText - displayText in underline *
- ; boldItalicText - display text in bold italic *
- ; *
- ; fontText(fontNum) - Display Text in font# from font pallete *
- ; e.g. ~This is in font 3~fontText(3)~ *
- ;******************************************************************************
-
- .userlink boldText '{\b %t}'
- .userlink italicText '{\i %t}'
- .userlink underlineText '{\ul %t}'
- .userlink boldItalicText '{\b\i %t}'
-
- .userlink fontText '{\f%1 %t}'
-
- .user lineBreak '\line '
-
- .ifndef document
-
- ;******************************************************************************
- ; Topics *
- ; *
- ; dropContext - set a context point in a long topic. e.g. ~ct1~dropContext~ *
- ; *
- ; You can later jump to this context with a !JumpID macro .. *
- ; *
- ; The }{ before the string are to resolve a WinHelp compiler bug - otherwise *
- ; the token is not recognized when in the middle of a paragraph. *
- ;******************************************************************************
-
- .userlink dropContext '{#{\footnote # %T}}'
-
- ;******************************************************************************
- ; Links *
- ; *
- ; The following set of userlink templates support special link capabilities : *
- ; *
- ; NormalTextLink(linkTarget) - Display the link text in normal color, and NOT *
- ; with the underline green format *
- ; NormalTextPopup(linkTarget) - Same as above - but for popups. *
- ; *
- ; GraphicLink(graphicObject LinkTarget) - Display a graphic, that conects to *
- ; a linkTarget, the graphic object *
- ; should have been decalred in a *
- ; .GRAPHIC statement. *
- ; graphicPopup(graphicObject linkTarget) - Same as above, coonnect to a popup *
- ;******************************************************************************
-
- .userlink NormalTextLink '{\uldb %t}{\v %%%1}'
- .userlink NormalTextPopup '{\ul %t}{\v %%%1}'
-
- .userlink graphicLink '{\uldb \{bmc %G1\}}{\v %2}'
- .userlink graphicPopup '{\ul \{bmc %G1\}}{\v %2}'
-
- .else
-
- .userlink NormalTextLink '%t'
- .userlink NormalTextPopup '%t'
-
- .userlink graphicLink '%t'
- .userlink graphicPopup '%t'
-
- .endif
-
- ;******************************************************************************
- ; Macros *
- ; *
- ; The complete windows macro facility is supported here, with a set of *
- ; !XXX macros defined as user links for general use in links, and *
- ; $XXX macros as substitution macros only. (Not for topictext links) *
- ;******************************************************************************
-
- .ifndef document
-
- .userlink !about '{\uldb %t}{\v !About()}'
- .userlink $about 'About()'
-
- .userlink $addAccelarator 'AddAccelerator(%1,%2,"%3")'
- .userlink !addAccelarator '{\uldb %t}{\v !AddAccelerator(%1,%2,"%3")}'
-
- .userlink $annotate 'Annotate()'
- .userlink !annotate '{\uldb %t}{\v !Annotate()}'
-
- .userlink $appendItem 'AppendItem("%1","%2","%3","%4")'
- .userlink !appendItem '{\uldb %t}{\v !AppendItem("%1","%2","%3","%4")}'
-
- .userlink $back 'Back()'
- .userlink !back '{\uldb %t}{\v !Back()}'
-
- .userlink $bookmarkDefine 'BookmarkDefine()'
- .userlink !bookmarkDefine '{\uldb %t}{\v !BookmarkDefine()}'
-
- .userlink $bookmarkMore 'BookmarkMore()'
- .userlink !bookmarkMore '{\uldb %t}{\v !BookmarkMore()}'
-
- .userlink $browseButtons 'BrowseButtons()'
- .userlink !browseButtons '{\uldb %t}{\v !BrowseButtons()}'
-
- .userlink $changeButtonBinding 'ChangeButtonBinding("%1","%2")'
- .userlink !changeButtonBinding '{\uldb %t}{\v !ChangeButtonBinding("%1","%2")}'
-
- .userlink $changeItemBinding 'ChangeItemBinding("1","2")'
- .userlink !changeItemBinding '{\uldb %t}{\v !ChangeItemBinding("1","2")}'
-
- .userlink $checkItem 'CheckItem("%1")'
- .userlink !checkItem '{\uldb %t}{\v !CheckItem("%1")}'
-
- .userlink $closeWindow 'CloseWindow("%1")'
- .userlink !closeWindow '{\uldb %t}{\v !CloseWindow("%1")}'
-
- .userlink $contents 'Contents()'
- .userlink !contents '{\uldb %t}{\v !Contents()}'
-
- .userlink $copyDialog 'CopyDialog()'
- .userlink !copyDialog '{\uldb %t}{\v !CopyDialog()}'
-
- .userlink $copyTopic 'CopyTopic()'
- .userlink !copyTopic '{\uldb %t}{\v !CopyTopic()}'
-
- .userlink $createButton 'CreateButton("%1","%2","%3")'
- .userlink !createButton '{\uldb %t}{\v !CreateButton("%1","%2","%3")}'
-
- .userlink $deleteItem 'DeleteItem("%1")'
- .userlink !deleteItem '{\uldb %t}{\v !DeleteItem("%1")}'
-
- .userlink $deleteMark 'DeleteMark("%1")'
- .userlink !deleteMark '{\uldb %t}{\v !DeleteMark("%1")}'
-
- .userlink $destroyButton 'DestroyButton("%1")'
- .userlink !destroyButton '{\uldb %t}{\v !DestroyButton("%1")}'
-
- .userlink $disableButton 'DisableButton("%1")'
- .userlink !disableButton '{\uldb %t}{\v !DisableButton("%1")}'
-
- .userlink $disableItem 'DisableItem("%1")'
- .userlink !disableItem '{\uldb %t}{\v !DisableItem("%1")}'
-
- .userlink $enableItem 'EnableItem("%1")'
- .userlink !enableItem '{\uldb %t}{\v !EnableItem("%1")}'
-
- .userlink $enableButton 'EnableButton("%1")'
- .userlink !enableButton '{\uldb %t}{\v !EnableButton("%1")}'
-
- .userlink $execProgram 'ExecProgram("%1", %2)'
- .userlink !execProgram '{\uldb %t}{\v !ExecProgram("%1",%2)}'
-
- .userlink $exit 'Exit()'
- .userlink !exit '{\uldb %t}{\v !Exit()}'
-
- .userlink $fileOpen 'FileOpen()'
- .userlink !fileOpen '{\uldb %t}{\v !FileOpen()}'
-
- .userlink $focusWindow 'FocusWindow("%1")'
- .userlink !focusWindow '{\uldb %t}{\v !FocusWindow("%1")}'
-
- .userlink $gotoMark 'GoToMark("%1")'
- .userlink !gotoMark '{\uldb %t}{\v !GoToMark("%1")}'
-
- .userlink $helpOn 'HelpOn()'
- .userlink !helpOn '{\uldb %t}{\v !HelpOn()}'
-
- .userlink $helpOnTop 'HelpOnTop()'
- .userlink !helpOnTop '{\uldb %t}{\v !HelpOnTop()}'
-
- .userlink $history 'History()'
- .userlink !history '{\uldb %t}{\v !History()}'
-
- .userlink $ifThen 'IfThen(IsMark("%1"),"%2")'
- .userlink !ifThen '{\uldb %t}{\v !IfThen(IsMark("%1"),"%2")}'
-
- .userlink $ifThenElse 'IfThenElse(IsMark("%1"),"%2","%3")'
- .userlink !ifThenElse '{\uldb %t}{\v !IfThenElse(IsMark("%1"),"%2","%3")}'
-
- .userlink $insertItem 'InsertItem("%1","%2","%3","%4",%5)'
- .userlink !insertItem '{\uldb %t}{\v !InsertItem("%1","%2","%3","%4",%5)}'
-
- .userlink $insertMenu 'InsertMenu("%1","%2",%3)'
- .userlink !insertMenu '{\uldb %t}{\v !InsertMenu("%1","%2",%3)}'
-
- .userlink $isMark 'IsMark("%1")'
- .userlink !isMark '{\uldb %t}{\v !IsMark("%1")}'
-
- .userlink $jumpContents 'JumpContents("%1")'
- .userlink !jumpContents '{\uldb %t}{\v !JumpContents("%1")}'
-
- .userlink $jumpContext 'JumpContext("%1",%2)'
- .userlink !jumpContext '{\uldb %t}{\v !JumpContext("%1",%2)}'
-
- .userlink $jumpHelpOn 'JumpHelpOn()'
- .userlink !jumpHelpOn '{\uldb %t}{\v !JumpHelpOn()}'
-
- .userlink $jumpId 'JumpId("%1","%2")'
- .userlink !jumpId '{\uldb %t}{\v !JumpId("%1","%2")}'
-
- .userlink $jumpKeyword 'JumpKeyWord("%1","%2")'
- .userlink !jumpKeyword '{\uldb %t}{\v !JumpKeyWord("%1","%2")}'
-
- .userlink $next 'Next()'
- .userlink !next '{\uldb %t}{\v !Next()}'
-
- .userlink $not 'Not(!IsMark("%1"))'
- .userlink !not '{\uldb %t}{\v !Not(!IsMark("%1"))}'
-
- .userlink $popupContext 'PopupContext("%1",%2)'
- .userlink !popupContext '{\uldb %t}{\v !PopupContext("%1",%2)}'
-
- .userlink $popupId 'PopupId("%1","%2")'
- .userlink !popupId '{\uldb %t}{\v !PopupId("%1","%2")}'
-
- .userlink $positionWindow 'PositionWindow(%1,%2,%3,%4,%5,"%6")'
- .userlink !positionWindow '{\uldb %t}{\v !PositionWindow(%1,%2,%3,%4,%5,"%6")}'
-
- .userlink $prev 'Prev()'
- .userlink !prev '{\uldb %t}{\v !Prev()}'
-
- .userlink $print 'Print()'
- .userlink !print '{\uldb %t}{\v !Print()}'
-
- .userlink $printerSetup 'PrinterSetup()'
- .userlink !printerSetup '{\uldb %t}{\v !PrinterSetup()}'
-
- .userlink $registerRoutine 'RegisterRoutine("%1","%2","%3")'
- .userlink !registerRoutine '{\uldb %t}{\v !RegisterRoutine("%1","%2","%3")}'
-
- .userlink $removeAccelerator 'RemoveAccelerator(%1,%2)'
- .userlink !removeAccelerator '{\uldb %t}{\v !RemoveAccelerator(%1,%2)}'
-
- .userlink $saveMark 'SaveMark("%1")'
- .userlink !saveMark '{\uldb %t}{\v !SaveMark("%1")}'
-
- .userlink $search 'Search()'
- .userlink !search '{\uldb %t}{\v !Search()}'
-
- .userlink $setContents 'SetContents("%1",%2)'
- .userlink !setContents '{\uldb %t}{\v !SetContents("%1",%2)}'
-
- .userlink $setHelpOnFile 'SetHelpOnFile("%1")'
- .userlink !setHelpOnFile '{\uldb %t}{\v !SetHelpOnFile("%1")}'
-
- .userlink $uncheckItem 'UncheckItem("%1")'
- .userlink !uncheckItem '{\uldb %t}{\v !UncheckItem("%1")}'
-
- ;******************************************************************************
- ; UNDOCUMENTED *
- ; *
- ; Support for the undocumented functions is provided according to the *
- ; documentation described in the WDDJ V5N1 "Undocumented WinHelp Macros" *
- ; article by Jim Mischel. *
- ; *
- ; The following macros are supported : *
- ; *
- ; ExtAbleItem(menu_item, toggle) - Enable and Disable the menu_item, with *
- ; toggle 0 = Enable, toggle 1 = Disable. *
- ; *
- ; ExtInsertItem - Same as InsertItem, but with one additional parameter that *
- ; allows you to set the menu state initially to enable or *
- ; disable state. 0 = Enable, 1 = Disable *
- ; Notice that the 1st parameter in this macro allows you to *
- ; set sub-menus in menus, a thing that can not be achieved *
- ; with the documented winhelp macros. *
- ; *
- ; Notice - The following undocumented menu and item identifiers can be used : *
- ; mnu_helpontopn and mnu_helpon for the starndard winhelp menu items *
- ; mnu_main for the winhelp standard menubar. *
- ; mnu_floating is the undocumented floating menu *
- ; *
- ; *
- ; FloatingMenu - Call the floating menu, that has been created with the *
- ; routines and the mnu_floating undocumented menu id. *
- ; *
- ; *
- ; ResetMenu - Restore's the winhelp standard menu. *
- ; *
- ; JumpHash, PopupHash - Jump according to the internal hash id. *
- ; *
- ;******************************************************************************
-
- .userlink $extAbleIte 'ExtAbleItem("%1",%2)'
- .userlink !extAbleIte '{\uldb %t}{\v !ExtAbleItem("%1",%2)}'
-
- .userlink $extInsertItem 'InsertItem("%1","%2","%3","%4",%5,%6)'
- .userlink !extInsertItem '{\uldb %t}{\v !InsertItem("%1","%2","%3","%4",%5,%6)}'
-
- .userlink $floatingMenu 'FloatingMenu()'
- .userlink !floatingMenu '{\uldb %t}{\v !FloatingMenu()}'
-
- .userlink $resetMenu 'ResetMenu()'
- .userlink !resetMenu '{\uldb %t}{\v !ResetMenu()}
-
- .userlink $jumpHash 'JumpHash(%1)'
- .userlink !jumpHash '{\uldb %t}{\v !JumpHash(%1)}'
-
- .userlink $PopupHash 'PopupHash(%1)'
- .userlink !PopupHash '{\uldb %t}{\v !PopupHash(%1)}'
-
- .endif
-
- ;******************************************************************************
- ; MultiMedia *
- ; *
- ; The following set of userlinks, and external routine reference, provide *
- ; access to Video, CDAudio, MCI string interface, and other FUN stuff. *
- ; *
- ; *
- ;******************************************************************************
-
- .ifndef document
-
- ;******************************************************************************
- ; mciSendString *
- ; *
- ; this is the interface to the multimedia send string interface. *
- ; *
- ; Video : (AVI files, must have VfW drivers installed to use) *
- ; *
- ; videoLink used in links, parameter 1 is the path to the AVI file. *
- ; Notice that the AVI file has to be in the "current directory". *
- ; videoOpen, videoPlay and videoClose are .ACTION strings of topics, in *
- ; HLPDK V11.0 or later (not V10.0), and must appear in that order. *
- ; *
- ; CDAudio : (RED Book CD Audio) *
- ; *
- ; CDAudioLink , parameter 1 is the start track to play from, parameter 2 - *
- ; the track to play to .. *
- ; *
- ; Generic MCI String command interface : *
- ; *
- ; mciStringLink - Parameter 1 is the MCI String to send. *
- ; mciStringAct - Used for .ACTION topic attributes in HLPDK V11.0 or later. *
- ;******************************************************************************
- .routine mciSendString MMSYSTEM SUuu
-
- .userlink videoLink '{\uldb %t}{\v !mciSendString("play %1",0,0,0)}'
- .userlink videoOpen 'mciSendString("open AVIVideo!%1 alias vid",0,0,0)'
- .userlink videoPlay 'mciSendString("play vid wait",0,0,0)'
- .userlink videoClose 'mciSendString("close vid",0,0,0)'
-
- .userlink CDAudioLink '{\uldb %t}{\v !mciSendString("open CDAudio",0,0,0)}{\v !mciSendString("play CDAudio from %1 to %2 wait",0,0,0)}{\v !mciSendString("close CDAudio",0,0,0)}'
-
- .userlink mciStringLink '{\uldb %t}{\v !mciSendString("%1",0,0,0)}'
- .userlink mciStringAct 'mciSendString("%1",0,0,0)}'
-
- .endif
-
- .endif
-
-
-